home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / FORTRAN Goodies / QuickTime Folder / Components.f next >
Encoding:
Text File  |  1992-10-23  |  4.5 KB  |  139 lines  |  [TEXT/MPS ]

  1. c    Created: Wednesday, August 14, 1991 at 12:11 PM
  2. c     Components.f
  3. c     FORTRAN Interface to the Macintosh Libraries    
  4.  
  5. c     Copyright Apple Computer, Inc. 1990 - 1991
  6. c     All rights reserved
  7.  
  8. !!IFC (.NOT. UsingIncludes)
  9. !!I zeroinc.f    
  10. !!ENDC
  11.  
  12. !!IFC (.NOT. GOTTypes)
  13. !!I Types.f
  14. !!ENDC
  15.  
  16. !!IFC NOT GOTCOMPONENTS
  17. !!SETC GOTCOMPONENTS = TRUE
  18.     Character*4 gestaltComponentMgr
  19.     Parameter (gestaltComponentMgr = 'cpnt')
  20.     
  21.     Integer*2 kAnyComponentType 
  22.     Integer*2 kAnyComponentSubType 
  23.     Integer*2 kAnyComponentManufacturer 
  24.     Integer*2 kAnyComponentFlagsMask 
  25.     Parameter (kAnyComponentType =            0)
  26.     Parameter (kAnyComponentSubType =         0)
  27.     Parameter (kAnyComponentManufacturer =    0)
  28.     Parameter (kAnyComponentFlagsMask =    0)
  29.     
  30.     Integer*4 cmpWantsRegisterMessage
  31.     Parameter (cmpWantsRegisterMessage = $80000000)
  32.     
  33.     
  34.     Structure /ComponentDescription/
  35.      Record /OSType/  componentType            ! A unique 4-byte code indentifying the command set 
  36.      Record /OSType/  componentSubType        ! Particular flavor of this instance 
  37.      Record /OSType/  componentManufacturer    ! Vendor indentification 
  38.      Integer*4 componentFlags                ! 8 each for Component,Type,SubType,Manuf/revision 
  39.      Integer*4 componentFlagsMask            ! Mask for specifying which flags to consider in search, zero during registration 
  40.     End Structure
  41.     
  42.     Structure /ResourceSpec/
  43.      Record /OSType/  resType            ! 4-byte code  
  44.      Integer*2 resId        
  45.     End Structure
  46.     
  47.     Structure /ComponentResource/
  48.      Record /ComponentDescription/ cd        ! Registration parameters 
  49.      Record /ResourceSpec/ component        ! resource where Component code is found 
  50.      Record /ResourceSpec/ componentName    ! name string resource 
  51.      Record /ResourceSpec/ componentInfo    ! info string resource 
  52.      Record /ResourceSpec/ componentIcon    ! icon resource 
  53.     End Structure
  54.  
  55.     Structure /ComponentResourcePtr/
  56.         Pointer /ComponentResource/ p
  57.     End Structure
  58.  
  59.     Structure /ComponentResourceHandle/
  60.         Pointer /ComponentResourcePtr/ h
  61.     End Structure
  62.  
  63.     ! Structure received by Component: 
  64.     Structure /ComponentParameters/
  65.      byte flags                ! call sync/async, modifiers: deferred, immed, etc 
  66.      byte paramSize            ! size in bytes of actual parameters passed to this call 
  67.      Integer*2 what            ! routine selector, negative for Component management calls 
  68.      Integer*4 params(0:0)    ! actual parameters for the indicated routine 
  69.     End Structure
  70.     
  71.     Structure /ComponentRecord/
  72.      Integer*4 data(0:0)
  73.     End Structure
  74.  
  75.     Structure /Component/
  76.         Pointer /ComponentRecord/ p
  77.     End Structure
  78.     
  79.     Structure /ComponentInstanceRecord/
  80.      Integer*4 data(0:0)
  81.     End Structure
  82.  
  83.     Structure /ComponentInstance/
  84.         Pointer /ComponentInstanceRecord/ p
  85.     End Structure    
  86.     
  87.     
  88. c    ComponentResult = Integer*4
  89. c    ComponentRoutine = Integer*4
  90. c    ComponentFunction = Integer*4
  91.     
  92.     Integer*2 kComponentOpenSelect 
  93.     Integer*2 kComponentCloseSelect 
  94.     Integer*2 kComponentCanDoSelect 
  95.     Integer*2 kComponentVersionSelect 
  96.     Integer*2 kComponentRegisterSelect 
  97.     Integer*2 kComponentTargetSelect 
  98.     Parameter (kComponentOpenSelect = -1)            ! ComponentInstance for this open 
  99.     Parameter (kComponentCloseSelect = -2)            ! ComponentInstance for this close 
  100.     Parameter (kComponentCanDoSelect = -3    )        ! selector # being queried 
  101.     Parameter (kComponentVersionSelect = -4    )        ! no params 
  102.     Parameter (kComponentRegisterSelect = -5)        ! no params 
  103.     Parameter (kComponentTargetSelect = -6    )        ! ComponentInstance for top of call chain 
  104.     
  105.     
  106.     ! Set Default Component flags 
  107.     Integer*2 defaultComponentIdentical 
  108.     Integer*2 defaultComponentAnyFlags 
  109.     Integer*2 defaultComponentAnyManufacturer 
  110.     Integer*2 defaultComponentAnySubType 
  111.     Integer*2 defaultComponentAnyFlagsAnyManufacturer 
  112.     Integer*2 defaultCompAnyFlagsAnyManufacturerAnySubType 
  113.     Parameter (defaultComponentIdentical = 0)
  114.     Parameter (defaultComponentAnyFlags = 1)
  115.     Parameter (defaultComponentAnyManufacturer = 2)
  116.     Parameter (defaultComponentAnySubType = 4)
  117.     Parameter (defaultComponentAnyFlagsAnyManufacturer = defaultComponentAnyFlags+
  118.     1    defaultComponentAnyManufacturer)
  119.     Parameter (defaultCompAnyFlagsAnyManufacturerAnySubType = 
  120.     1    defaultComponentAnyFlags+defaultComponentAnyManufacturer+
  121.     2    defaultComponentAnySubType)
  122.     
  123.     ! errors from component manager & components 
  124.     Integer*2 invalidComponentID 
  125.     Integer*2 validInstancesExist 
  126.     Integer*2 componentNotCaptured 
  127.     Integer*2 componentDontRegister 
  128.     Parameter (invalidComponentID = -3000)
  129.     Parameter (validInstancesExist = -3001)
  130.     Parameter (componentNotCaptured = -3002)
  131.     Parameter (componentDontRegister = -3003)
  132.     
  133.     Integer*4 badComponentInstance 
  134.     Integer*4 badComponentSelector 
  135.     Parameter (badComponentInstance = $80008001)
  136.     Parameter (badComponentSelector = $80008002)
  137.     
  138. !!ENDC ! GotComponents 
  139.